#pragma once

#include "ScriptCompiler/AST/ASTNode.h"

class CAccessLevelNode;
class CScriptToken;
class CParameterNode;
class CTypeNode;

class CDelegateNode : public CASTNode
{
public:
    CDelegateNode(std::weak_ptr<CScriptFileContext> InFile)
        : CASTNode( InFile,EASTNodeType::Delegate)
    {
    }

    std::shared_ptr<CScriptToken> Delegate;

    //name of delegate
    std::shared_ptr<CScriptToken> Name;

    TOptional<std::shared_ptr<CAccessLevelNode>> AccessLevel;

    //return type
    std::shared_ptr<CTypeNode> ReturnType;

    //parameters
    TVector<std::shared_ptr<CParameterNode>> Parameters;


    virtual void DebugPrint(int32_t InDepth) override;


    virtual std::shared_ptr<CScriptToken> GetFirstToken() override { return Delegate; }
};